home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 58
/
058side2.d64
/
decision maker
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-29
|
8KB
|
235 lines
10 poke 53281,0:poke 53280,0:print chr$(147);chr$(14);:gosub 1840:print
20 print:s$="[204][207][193][196][211][212][193][210] [208][210][197][211][197][206][212][211]":gosub 1680:print"
25 s$[178]"str$ vallenright$(NULL)right$(NULL)(NULL) (NULL)atn(NULL)val (NULL)":[141] 1680
30 [153]:s$[178]"by":[141] 1680:[153]:s$[178]"str$avid (NULL)eithauser":[141] 1680:[141]61000
40 [153]:[153]:[153]:[141] 1700
50 [153] [199](147):[156]
55 [134] ch$(20),c2$(20),e$(20),b$(20),v(20,50),vt(20),pc(50)
60 cl[178]6
70 [153]:[141] 1830
75 s$[178]"right$nput the name of the decision you want":[141] 1680
80 [153]"to make (ascor example, (NULL)hat car to buy)"
90 [153]:[141] 1800
100 [141] 1850:nd$[178]i$:[139] nd$[178]"" [167][153]"on":[137] 100
101 [153]"on";: [129]i[178]1[164]20[171][195](nd$)[173]2
102 [153][199](148);:[130]:[151]212,0:[153]:[153]
110 [153]
120 [141] 1820
130 [153] "left$ow many choices are there? (max 20) cmdcmdcmdcmd";
131 limit[178]2:[141] 1850:nc[178]v
132 [139]nc[177]20[167][153]"onononon":[137] 130
133 [139]nc[179]2[167][153]"onononon":[137] 130
150 [153]"load":s$[178][196](nc)[170]" choices...":[141]1680:[129] x[178]1 [164] nc
160 [153]:[153] "(NULL)ame of choice #";x;"?"
162 [141] 1850:ch$(x)[178]i$
165 [139] ch$(x)[178]"" [167] [153]"onon":[137]162
170 [139] [195](ch$(x))[177]cl [167] cl[178][195](ch$(x))
180 [130]:[153]"load"
190 [153] "left$ow many criteria for making the choice"
200 [153] "are there? ";:[141] 1850:cr[178][197](i$)
205 [139] cr[179]2 [167] [141] 1790:[137] 190
210 [153] [199](147);:[141] 1840:[153]
220 [153] " (NULL)ome of the"cr"criteria are probably"
230 [153] "what we call cost criteria. (NULL)his means"
240 [153] "anything that we want to minimize, such"
250 [153] "as expense, time required to do"
260 [153] "something, etc. (NULL)ome of the criteria"
270 [153] "are what we call benefit criteria. (NULL)his"
280 [153] "means anything we want to maximize,"
290 [153] "such as how much we get paid, comfort,"
300 [153] "how much we enjoy something, etc."
310 [153]:[141] 1820:[153] "left$ow many of the criteria are cost"
320 [153] "criteria? ";:[141] 1850:cc[178][197](i$):[139] i$[178]"" [167] 310
330 [139] cc[179]0 [176] cc[177]cr [167] [141] 1790:[137] 310
340 cb[178]cr[171]cc
350 [139] cc[178]0 [167] 400
360 [129] x[178]1 [164] cc
370 [153] "(NULL)hat is the name of cost criteria":[153] "#";x;"? ";:[141] 1850
380 e$(x)[178]i$:[139] e$(x)[178]"" [167] 370
390 [130] x
400 [139] cb[178]0 [167] 450
410 [129] x[178]1 [164] cb
420 [153] "(NULL)hat is the name of benefit criteria"
430 [153] "#";x;"? ";:[141] 1850:b$(x)[178]i$:[139] b$(x)[178]"" [167] 420
440 [130] x
450 [153] [199](147);:[141] 1840
455 s$[178]"(NULL)our criteria for making a choice are:"
460 [141] 1680:[153]
470 [139] cc[177]0 [167] [129] x[178]1 [164] cc:[153] x") "e$(x):[130] x
480 [139] cb[177]0 [167] [129] x[178]1 [164] cb:[153] x[170]cc") "b$(x):[130] x
490 [153]:[141] 1820:[153] "(NULL)hich of these is the most important"
500 [153] "(input number) ";:[141] 1850:x[178][197](i$)
510 [139] x[179]1 [176] x[177]cr [167] [141] 1790:[137] 490
520 [139] x[179][178]cc [167] t$[178]e$(x):[137] 540
530 t$[178]b$(x[171]cc)
540 pc(x)[178]100
550 [153] [199](147);:[153]:[153]:[141] 1840:s$[178]"(NULL)he criteria":[141] 1680
560 [141] 1830:s$[178]t$:[141] 1680:[141] 1840
570 s$[178]"has now been assigned an importance":[141] 1680
580 s$[178]"rating of 100. (NULL)ou must now rate the":[141] 1680
590 s$[178]"other criteria on a scale of 1 to 100":[141] 1680
600 s$[178]"compared to":[141] 1680:[141] 1830:s$[178]t$:[141] 1680
610 [141] 1840:s$[178]"ascor example, if":[141] 1680
620 [139] x[179][177]1 [175] cc [167] t2$[178]e$(1):[137] 670
630 [139] x[179][177]1 [175] cc[178]0 [167] t2$[178]b$(1):[137] 670
640 [139] x[178]1 [175] cc[177]1 [167] t2$[178]e$(2):[137] 670
650 [139] x[178]1 [175] cc [167] t2$[178]b$(1):[137] 670
660 t2$[178]b$(2)
670 [141] 1830:s$[178]t2$:[141] 1680:[141] 1840
680 s$[178]"is half as important as":[141] 1680:[141] 1830:s$[178]t$:[141] 1680
690 [141] 1840:s$[178]"then the rating of":[141] 1680
700 [141] 1830:s$[178]t2$:[141] 1680:[141] 1840:s$[178]"is 50.":[141] 1680
710 [141] 1700
720 [153] [199](147);:[141] 1820:s$[178]"lenompared to":[141] 1680:s$[178]t$
730 [141] 1680:s$[178]"which has a value of 100,":[141] 1680
740 s$[178]"how important is":[141] 1680
750 [141] 1820:[153]:[139] cc[178]0 [167] 810
760 [129] x[178]1 [164] cc
770 [139] pc(x)[177]0 [167] 800
780 [153] e$(x);"? ";:[141] 1850:pc(x)[178][197](i$)
790 [139] pc(x)[179]1 [176] pc(x)[177]100 [167] [141] 1790:[137] 780
800 [130] x
810 [139] cb[178]0 [167] 870
820 [129] x[178]1 [164] cb
830 [139] pc(cc[170]x)[177]0 [167] 860
840 [153] b$(x);"? ";:[141] 1850:pc(cc[170]x)[178][197](i$)
850 [139] pc(cc[170]x)[179]1 [176] pc(cc[170]x)[177]100 [167] [141] 1790:[137] 840
860 [130] x
870 [153] [199](147):[153]:[141] 1840
880 [153] " (NULL)ow you must input the values of"
890 [153] "each criteria for each choice. right$f there"
900 [153] "is an actual value, such as dollars or"
910 [153] "hours, you may input this value."
920 [153] "right$f there is no numerical value, you may"
930 [153] "assign arbitrary values. ascor example,"
940 [153] "if you like one color twice as much as"
950 [153] "another, you could input a value of 10"
960 [153] "for the color you like most and 5 for"
970 [153] "the one you like less."
980 [141] 1700
990 [129] x[178]1 [164] cr
1000 [153] [199](147);:[141] 1840:s$[178]"ascor the criteria:":[141] 1680
1010 [139] x[179][178]cc [167] s$[178]e$(x):[137] 1030
1020 s$[178]b$(x[171]cc)[170]","
1030 [141] 1830:[141] 1680
1040 [141] 1820:s$[178]"what is the value for":[141] 1680:[153]
1050 [129] y[178]1 [164] nc
1060 vt(y)[178]0:[153] ch$(y);"? ";:[141] 1850:vt(y)[178][197](i$)
1070 [139] vt(y)[178]0 [167] [141] 1790:[137] 1060
1080 [130] y
1090 [139] x[177]cc [167] 1180
1100 vm[178]1e30
1110 [129] y[178]1 [164] nc
1120 [139] vt(y)[179]vm [167] vm[178]vt(y)
1130 [130] y
1140 [129] y[178]1 [164] nc
1150 v(y,x)[178]vm[173]vt(y)
1160 [130] y
1170 [137] 1250
1180 vm[178]0
1190 [129] y[178]1 [164] nc
1200 [139] vt(y)[177]vm [167] vm[178]vt(y)
1210 [130] y
1220 [129] y[178]1 [164] nc
1230 v(y,x)[178]vt(y)[173]vm
1240 [130] y
1250 [130] x
1260 [153] [199](147);:vm[178]0
1270 [129] x[178]1 [164] nc
1280 vt(x)[178]0
1290 [129] y[178]1 [164] cr
1300 vt(x)[178]vt(x)[170]pc(y)[172]v(x,y)
1310 [130] y
1320 [139] vt(x)[177]vm [167] vm[178]vt(x)
1330 [130] x
1340 [129] x[178]1 [164] nc:c2$(x)[178]ch$(x):vt(x)[178]100[172]vt(x)[173]vm:[130] x
1350 [129] x[178]nc [164] 1 [169] [171]1
1360 z[178]0
1370 [129] y[178]1 [164] x
1380 [139] vt(y)[178][177]vt(y[170]1) [167] 1400
1390 z[178]vt(y):vt(y)[178]vt(y[170]1):vt(y[170]1)[178]z:s$[178]c2$(y)
1395 c2$(y)[178]c2$(y[170]1):c2$(y[170]1)[178]s$:z[178][171]1
1400 [130] y
1410 [139] z[178]0 [167] 1430
1420 [130] x
1430 [141] 1840:s$[178]"ascor the decision":[141] 1680:[141] 1830
1440 s$[178]nd$:[141] 1680:[141] 1840
1450 s$[178]"the following is a list of your":[141] 1680
1460 s$[178]"choices, and their point values:":[141] 1680
1470 [153]:[153] "lenhoice";[163]cl[170]2);"(NULL)oints"
1480 [129] x[178]1 [164] nc
1490 [153] c2$(x);[163]cl[170]1);[181](vt(x))
1500 [130] x
1510 [153]:s$[178]"str$o you want hard copy":[141] 1730:[139] yn[178]0 [167] 1620
1520 [159] 1,4,7:[152]1,"ascor the decision":[152]1,nd$
1530 [152]1,"the following is a list of your"
1540 [152]1,"choices, and their point values:"
1550 [152]1," ":[152]1,"lenhoice";:[129] z[178]1 [164] cl[170]5:[152]1," ";:[130] z
1560 [152]1,"(NULL)oints"
1570 [129] x[178]1 [164] nc
1580 [152]1,c2$(x);:[129] z[178]1 [164] cl[170]10[171][195](c2$(x)):[152]1," ";:[130] z
1590 [152]1,[181](vt(x))
1600 [130] x
1610 [160] 1
1620 s$[178]"(NULL)un str$ecision (NULL)aker over":[141] 1730:[139] yn[178]0 [167] 60000
1630 s$[178]"(NULL)epeat same decision":[141] 1730:[139] yn[178]0 [167] 50
1640 [141] 1830:s$[178]"(NULL)lease wait a few moments.":[141] 1680
1650 [129] x[178]1 [164] 20:vt(x)[178]0:pc(x)[178]0:[129] y[178]1 [164] 50:v(x,y)[178]0:[130] y:[130] x
1655 [137] 450
1660 s$[178]"valnd str$ecision (NULL)aker":[141] 1730:[139] yn[178]0 [167] 1620
1670 [137]60000
1680 [139] [19